/*
 * @Author: cest
 * @Date: 2022-08-09 11:16:12
 * @LastEditTime: 2022-08-09 11:41:47
 * @LastEditors: cest
 * @FilePath: /nuxt3-vite/store/cart.ts
 * @Description: 编辑描述内容
 */
import { acceptHMRUpdate, defineStore } from 'pinia'

export const useCartStore = defineStore('cart', () => {
  const rawItems = ref(new Array<String>())
  const addItem = function (name: string): void {
    rawItems.value.push(name)
  }
  return {
    rawItems,
    addItem,
  }
})
if (import.meta.hot)
  import.meta.hot.accept(acceptHMRUpdate(useCartStore, import.meta.hot))

